package com.dxy.lc.model.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.time.LocalDateTime;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;

/**
 * <p>
 * 
 * </p>
 *
 * @author dxy
 * @since 2024-11-07
 */
@Getter
@Setter
@Accessors(chain = true)
@TableName("t_room")
public class Room {

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    private String roomName;

    private Integer roomType;

    private String roomAvatar;

    private String roomBulletin;

    private String lastMsg;

    private Integer lastMsgSentBy;

    private String lastMsgSentByName;

    private LocalDateTime lastMsgAt;

    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime createdAt;

    @TableField(fill = FieldFill.INSERT)
    private Integer createdBy;

    @TableField(fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updatedAt;

    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Integer updatedBy;

    @TableField(exist = false)
    private Integer isMuted;

    @TableField(exist = false)
    private long unreadMsgCount;

    @TableField(exist = false)
    private Object extData;

}
